fn say_hello1(name: &str) -> String {
    // We construct the result string manually.
    let mut result = "Hello ".to_string();
    result.push_str(name);
    result.push('!');

    result
}

fn say_hello2(name: &str) -> String {
    // Using format! is better.
    format!("Hello {name}!")
}

fn main() {
    {
        println!("{}", say_hello1("world"));
    }

    println!();

    {
        println!("{}", say_hello2("world"));
    }
}
